;
function addLoadEvent(func) {
    var oldonload = window.onload;
    	if (typeof window.onload != 'function') {
    		window.onload = func;
  		} else {
    	window.onload = function() {
      		oldonload();
      		func();
    	}
  	}
}

var list = new Array();
	list = [//["会场图片", "会场名称", "链接"]
		["images/a.png", "HP学组专题", "HP-live.html"],

		["images/a.png", "IBD学组专题", "IBD-live.html"],

		["images/a.png", "功能胃肠动力学组", "stomach-live.html"],

		["images/a.png", "肝胆疾病协作组", "liver-live.html"],

		["images/a.png", "食管协作组", "esophagus-live.html"],

		["images/a.png", "胰腺学组", "pancreas-live.html"],

		["images/a.png", "内外科对话", "interandexter-live.html"],

		["images/a.png", "肿瘤协作组", "tumor-live.html"],

		["images/a.png", "微生态协作组", "microecology-live.html"],

		["images/a.png", "营养协作组", "nutrition-live.html"],

		["images/a.png", "儿科协作组", "Pediatric-live.html"],

		["images/a.png", "老年消化协作组", "elderly-live.html"],

		["images/a.png", "临床流行病协作组", "clinical-live.html"],

		["images/a.png", "微创与介入协作组", "invasive-live.html"],

		["images/a.png", "整合协作组", "Integration-live.html"],

		["images/a.png", "中西医结合协作组", "Medicine-live.html"],

		["images/a.png", "心身疾病协作组", "Psychosomatic-live.html"],

		["images/a.png", "护理协作组", "Care-live.html"],

		["images/a.png", "消化病理协作组", "digestion-live.html"],

		["images/a.png", "生物样本库与转化医学协作组", "Biological-live.html"],

		["images/a.png", "医学人文协作组", "Humanities-live.html"],

		["images/a.png", "东西方论坛", "Forum-live.html"],

		["images/a.png", "军事消化病学", "Military-live.html"],

		["images/a.png", "基础研究专题", "research-live.html"],

		["images/a.png", "消化病影像专题", "Digestive-live.html"],

		["images/a.png", "青年论坛", "Youth-live.html"],

		["images/a.png", "疑难病诊治思维专题", "Incurable-live.html"],

		["images/a.png", "继续教育报告", "education-live.html"],
		["", "", ""]
		];
var listNum = list.length;

function addImg() {
	for (var i = 0; i < listNum; i++) {
		var subList = document.getElementById("subList");//获取div#subList

		var sub = document.createElement("a");//创建div.sub
		sub.setAttribute("class", "sub");
		sub.setAttribute("target", "view_window");
		sub.setAttribute("href", list[i][2]);

		var img = document.createElement("img");
	　　img.setAttribute("id", "newImg");
		img.setAttribute("alt", list[i][1]);
		img.src = list[i][0];

		var span = document.createElement("span");
	　　span.setAttribute("id", "span");
		var node = document.createTextNode(list[i][1]);
		span.appendChild(node);

		subList.appendChild(sub);
		sub.appendChild(img);
		sub.appendChild(span);
	};
}
addLoadEvent(addImg);